package com.ffyc.cemp.web.controller;

import com.ffyc.cemp.common.dto.HttpResult;
import com.ffyc.cemp.domain.vo.MovieChartVo;
import com.ffyc.cemp.services.service.IStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "统计api接口")
@RestController
@RequestMapping("/api/statis")
public class StatisticsController {

    @Autowired
    private IStatisticsService iss;

    @ApiOperation(value = "statisMovieType", notes = "统计电影类型的分布")
    @GetMapping("/statisMovieType")
    public HttpResult<List<MovieChartVo>>  statisMovieType(){

        return HttpResult.success( iss.statisMovieType());
    }


}
